/*
 * Rectangle.h
 *
 *  Created on: 22-Feb-2014
 *      Author: dev
 */

#ifndef RECTANGLE_H_
#define RECTANGLE_H_

#include <iostream>
#include <sstream>
#include <vector>
#include "Point.h"

using namespace std;

namespace tf {

class Rectangle {
public:
	Rectangle();

	Rectangle(int x, int y, size_t width, size_t height);

	void set(int x1, int y1, int x2, int y2);

	// also true when touching edges
	bool intersect(Rectangle rect);

	virtual ~Rectangle();

	int top();
	int right();
	int bottom();
	int left();

	string str();

	vector<Point*> corners;

private:
	int x;
	int y;
	size_t width;
	size_t height;
};

} /* namespace tf */
#endif /* RECTANGLE_H_ */
